var path = require('path')
var WebpackCoc = require('webpack-coc')

//配置参数后面详述
var configMgr = new  WebpackCoc({
    project_name:'ubooking',
    src_path:path.join(__dirname , './src'),
    dist_path:path.join(__dirname, './dist'),
    node_module_path:path.join(__dirname,'./node_modules'),
    map_json_filename:'assets-map.json',
    map_json_path:path.join(__dirname,'./dist'),
    libs:[],
    cdn_path:'/dist',
    dev_port:'9527'
})


var argv = require('yargs').argv;

if(argv.d){
    console.log('in dev mode')
    configMgr.buildDevelopment()
    configMgr.runDevelopment()
}else{
    configMgr.buildProduction()
    configMgr.runProduction();
}


